Add Policy
Route
/v2/policies
Description
Create a new data protection or content inspection policy with the provided configuration.
Method
POST
Inputs
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Policy type (data_protection, content_inspection) |
name | string | Yes | Human-readable name for the policy |
description | string | No | Detailed description of the policy's purpose |
severity | string | Yes | Severity level (informational, low, medium, high, critical) |
selection_type | string | Yes | How datasets are selected (dataset, sensitivity) |
dataset_ids | array[string] | No | List of dataset IDs (when selection_type is dataset) |
dataset_sensitivities | array[integer] | No | List of sensitivity levels (when selection_type is sensitivity) |
rule | object | Yes | Rule configuration for policy enforcement actions |
exclude_origin | boolean | No | Whether to exclude origin location in policy evaluation |
backfills_enabled | boolean | No | Whether historical data backfills are enabled |
Request Body
{
"type": "data_protection",
"name": "Financial Data Protection",
"description": "Protect sensitive financial information",
"severity": "critical",
"selection_type": "sensitivity",
"dataset_sensitivities": [4, 5],
"rule": {
"status": "risky",
"create_incident": true,
"record_screenshots": true,
"inspect_content": true,
"realtime_response_config": {
"incident_action": "warn"
}
},
"exclude_origin": false,
"backfills_enabled": true
}
Output
| Field | Type | Description |
|---|---|---|
type | string | Always "policies" |
size | integer | Number of policies returned (always 1) |
resources | array[Policy] | Array containing the created policy |
errors | array[Error] | Any errors encountered |
Rate Limit
- 60 requests per minute per API key
- 5 concurrent requests per endpoint
Example Response
{
"type": "policies",
"size": 1,
"resources": [
{
"id": "policy-789",
"type": "data_protection",
"name": "Financial Data Protection",
"description": "Protect sensitive financial information",
"severity": "critical",
"disabled": false,
"selection_type": "sensitivity",
"dataset_sensitivities": [4, 5],
"created_at": "2024-01-15T10:30:00Z"
}
],
"errors": []
}